<!--
 * @Author: C.
 * @Date: 2021-09-01 13:23:26
 * @LastEditTime: 2021-09-06 17:32:03
 * @Description: file content
-->
<template>
  <div>
    <Collapse v-model:activeKey="printStore.toggle">
      <CollapsePanel key="paperStyle" header="纸张设置">
        <PageSet />
      </CollapsePanel>
      <CollapsePanel key="field" header="字段设置">
        <FontSet />
      </CollapsePanel>
      <CollapsePanel key="header" header="打印头">
        <Block name="header" />
      </CollapsePanel>
      <CollapsePanel key="body" header="打印体">
        <Block name="body" />
      </CollapsePanel>
      <CollapsePanel key="footer" header="打印尾">
        <Block name="footer" />
      </CollapsePanel>
      <CollapsePanel key="table" header="表格">
        <TableSet name="table" />
      </CollapsePanel>
    </Collapse>
  </div>
</template>
<script lang="ts">
  import { defineComponent, ref } from 'vue';
  import { CollapsePanel, Collapse } from 'ant-design-vue';
  import FontSet from './cpn/FontSet/index.vue';
  import Block from './cpn/Block/index.vue';
  import TableSet from './cpn/TableSet/index.vue';
  import PageSet from './cpn/PageSet/index.vue';
  import { usePrintStore } from '/@/store/modules/print';
  export default defineComponent({
    components: { CollapsePanel, Collapse, FontSet, Block, TableSet, PageSet },
    setup() {
      let text = ref('12315665456');
      let printStore = usePrintStore();
      return {
        text,
        printStore,
      };
    },
  });
</script>
